home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / CC_C / 0574.ZIP / FTELL.ASM < prev    next >
Assembly Source File  |  1986-10-21  |  369b  |  23 lines

  1. include compiler.inc
  2.  
  3.     ttl    ftell, 1.05, 10-21-86, jwk
  4.  
  5.     dseg
  6.     cseg
  7.  
  8.     xtfs    <lseek, $strhand>
  9.  
  10.         ;    long ftell(stream) FILE *stream;
  11.         ;    { return lseek(hdl(stream),0L,1);
  12.         ;    }
  13.  
  14.     procdef    ftell, <<stream,ptr>>
  15.     callit    $strhand, <<stream,ptr>>
  16.     xor    bx,bx
  17.     mov    cx,1
  18.     callit    lseek, <<cx, reg>, <bx, reg>, <bx, reg>, <ax, reg>>
  19.     pret
  20.     pend    ftell
  21.  
  22.     finish
  23.